package com.itheima.dateDemo;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;

public class LocalDateTimeDemo05 {
    public static void main(String[] args) {
        LocalDateTime localDateTime = LocalDateTime.now();
        System.out.println(localDateTime);//2021-03-27T14:17:13.741264700
        LocalDate toLocalDate = localDateTime.toLocalDate();
        System.out.println(toLocalDate);//2021-03-27
        LocalTime toLocalTime = localDateTime.toLocalTime();
        System.out.println(toLocalTime);//14:17:13.741264700
    }
}
